import request from '@/plugins/axios'

export function fetchList(query) {
    return request({
        url: '/api/lessormange/page',
        method: 'get',
        params: query
    })
}
export function getBill(query) {
    return request({
        url: '/api/lessormange/getbill/',
        method: 'get',
        params: query
    })
}
export function getNobill(query) {

    return request({
        url: '/api/lessormange/getNobill/',
        method: 'get',
        params: query
    })
}
export function getReContract(query) {

    return request({
        url: '/api/lessormange/getReContract/',
        method: 'get',
        params: query
    })

}

export function addObj(obj) {
    return request({
        url: '/api/lessormange',
        method: 'post',
        data: obj
    })
}

export function getObj(id) {
    return request({
        url: '/api/lessormange/' + id,
        method: 'get'
    })
}

export function delObj(id) {
    return request({
        url: '/api/lessormange/' + id,
        method: 'delete'
    })
}

export function putObj(obj) {
    return request({
        url: '/api/lessormange',
        method: 'put',
        data: obj
    })
}

export function getClientLesseeByCardId(query) {
    return request({
        url: '/api/lessormange/getclientlesseebycardid',
        method: 'get',
        params: query
    })
}

export async function toLeadExcle(obj) {
    return request({
        url: '/api/lessormange/toparseexcel',
        method: 'post',
        data: obj,
        config:{
            headers:{'Content-Type':'multipart/form-data'}
        }
    })
}

export async function getLeadInClientLessees(obj) {
    return request({
        url: '/api/lessormange/getleadinclientlessee',
        method: 'get',
        params: obj
    })
}

export async function delLeadInClientLessees(obj) {
    return request({
        url: '/api/lessormange/delleadinclientlessee',
        method: 'get',
        params: obj
    })
}

export async function getLeadInErrorInfos(obj) {
    return request({
        url: '/api/leadinerrorinfo/getleadinerrorinfos',
        method: 'get',
        params: obj
    })
}

export async function delLeadInErrorInfos(obj) {
    return request({
        url: '/api/leadinerrorinfo/delleadinerrorinfos',
        method: 'get',
        params: obj
    })
}
